﻿<%@ Page Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="PS_EmployeeSearch.aspx.cs" Inherits="KPIS.GERP.GHRMS.APP.App_UI.Forms.PS_EmployeeSearch" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

<%@ Register src="../Controls/user.ascx" tagname="user" tagprefix="uc4" %>
<%@ Register src="../Controls/DatePicker.ascx" tagname="DatePicker" tagprefix="uc2" %>

<asp:Content ID="Content1" runat="server" contentplaceholderid="ContentPlaceHolder1">  


<script src="../../Scripts/DatePicker.js" type="text/javascript"></script>
    
    <script type="text/javascript">
        var cancelDropDownClosing = false;

      function isNumberKey(event)  // ตัวเลขอย่างเดียว
      {
         var charCode = (event.which) ? event.which : event.keyCode
         if(charCode > 31 && (charCode < 48 || charCode > 57))
         {
//                 alert("กรอกได้แต่ตัวเลขครับ!")
             return false;
          }
         return true;
      }
     
        function openProjectDetails(id)
        {
            radopen("PR_SalaryDetail.aspx?id=" + id , "ProjectDtls");
             return false;

            //maximunWindow();
        }
        function onTextChange(sender) 
        {
                    if (sender.get_value() == "") {
                        sender.set_text("");
                    }
                }
        function OnClientDropDownClosingHandler(sender, e) {
            //do not close the second combo if 
            //a checkbox from the first is clicked
            e.set_cancel(cancelDropDownClosing);
        }

    </script>

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid2">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid2" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnSelectPosition">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="selectFieldPosition" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnSelectDegree">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="selectDegree" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnSelectQual">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="selectQual" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnSelectMajor">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="selectMajor" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnSelectIns">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="selectInstitutes" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            
            <telerik:AjaxSetting AjaxControlID="btnMovePosition">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="selectFieldPosition" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnMoveDegree">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="selectDegree" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnMoveQual">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="selectQual" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnMoveMajor">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="selectMajor" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnMoveIns">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="selectInstitutes" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" 
        Height="100%" Width="75px" Transparency="50">
        <table style="height: 100%; width: 100%" border="0">
            <tr>
                <td width="100%" align="center" valign="middle">
                    <img alt="Loading..." 
                        src="../Images/Buttons/loading.gif" 
                        style="border: 0px;" />
                </td>
            </tr>
        </table>
    </telerik:RadAjaxLoadingPanel>   
    
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
        <Windows>
            <telerik:RadWindow
                ID="ProjectDtls"
                runat="server"
                ShowContentDuringLoad="false"
                VisibleStatusbar="false"
                Title="รายการโยกย้าย"
                Width="1100px"
                Height="600px"
                Modal="true"
                Behaviors="Close">
            </telerik:RadWindow>
        </Windows>

        <Windows>
            <telerik:RadWindow
                ID="RadWindow1"
                DestroyOnClose="true"
                Modal="true"
                VisibleStatusbar="false"
                runat="server">
            </telerik:RadWindow>
        </Windows>


    </telerik:RadWindowManager>
    
    <title>สอบถามข้อมูลบุคลากรตามเงื่อนไข</title>
    <link href="../../Styles/CssClass.css" rel="stylesheet" type="text/css" /> 
    
    <asp:Panel ID="Panel6" runat="server">
        <table width="1000" cellpadding="0" cellspacing="0" >
            <tr>
                <td width="280" valign="top">

                    <!-- <uc4:user ID="user1" runat="server" /> -->

                </td>

                <td width="20"></td>

                <td>
                    <div class="moduleDivSlim700" style="margin-top: 10px;">
                        <div class="moduleDivBottom700">
                            <asp:Panel ID="PanelFilter" runat="server" Width="700px" ScrollBars="Auto">
                                <table>
                                    <tr>
                                        <td style="font-weight: bold;font-size:medium; padding-left: 15px; color:rgb(65, 65, 65)">สอบถามข้อมูลบุคลากรตามเงื่อนไข</td>
                                    </tr>
                                </table>
                            </asp:Panel>
                        </div>
                    </div>
                </td>
            </tr>
        </table>

        <table>
            <tr>
                <td>
                    <div class="Background980V2" style="width: 976px">
                        <asp:Panel ID="Panel22" runat="server" ScrollBars="Auto"
                            Width="980px">
                            <table align="center" width="950px">
                                <tr>
                                    <td align="right" style="width: 130px; height: 22px;">ประเภทบุคลากร :</td>
                                    <td align="left" style="height: 22px; width: 310px;">
                                        <telerik:RadComboBox ID="cmbEmployeeType" runat="server"
                                            CausesValidation="false"
                                            DataTextField="Name"
                                            DataValueField="Sequence"
                                            EmptyMessage="... เลือกทั้งหมด..."
                                            Filter="Contains"
                                            OnClientTextChange="onTextChange"
                                            Width="250px">
                                        </telerik:RadComboBox>
                                    </td>
                                    <td align="right" style="width: 143px">โครงสร้างตามมติกรรมการบริหารสถาบัน :</td>
                                    <td align="left" style="height: 22px">
                                        <telerik:RadComboBox ID="cmbJobSite" runat="server" AllowCustomText="true"
                                            DataTextField="job_site_name" DataValueField="job_site_seq"
                                            EmptyMessage="... เลือกทั้งหมด ..." Filter="Contains"
                                            OnClientTextChange="onTextChange" Width="250px" Style="margin-left: 0px">
                                        </telerik:RadComboBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">สังกัดตามการบริหารจัดการ :</td>
                                    <td align="left">
                                        <telerik:RadComboBox ID="cmbWorkingJobSite" runat="server" AllowCustomText="true"
                                            DataTextField="job_site_name" DataValueField="job_site_seq"
                                            EmptyMessage="... เลือกทั้งหมด ..." Filter="Contains"
                                            OnClientTextChange="onTextChange" Width="250px" Style="margin-left: 0px">
                                        </telerik:RadComboBox>
                                    </td>
                                    <td></td>
                                    <td></td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 130px; height: 25px;" valign="middle">อายุครบ :</td>
                                    <td align="left" style="height: 25px; width: 310px;">
                                        <telerik:RadTextBox ID="txtAge" runat="server" MaxLength="10" Skin="Outlook"
                                            Width="100px">
                                        </telerik:RadTextBox>
                                        &nbsp;ปี เมื่อวันที่ :&nbsp;<uc2:DatePicker ID="txtDateAge" runat="server"
                                            EnableViewState="False" />
                                    </td>
                                    <td align="right" style="height: 25px; width: 143px;">อายุราชการครบ :</td>
                                    <td align="left">
                                        <telerik:RadTextBox ID="txtExp" runat="server" MaxLength="10" Skin="Outlook"
                                            Width="100px">
                                        </telerik:RadTextBox>
                                        &nbsp;ปี เมื่อวันที่ :&nbsp;<uc2:DatePicker ID="txtDateExp" runat="server" />
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 130px; height: 26px;" valign="top">ประเภทตำแหน่ง :</td>
                                    <td align="left" valign="top" colspan="3" style="height: 26px">
                                        <asp:CheckBoxList ID="cblPosType" runat="server" DataTextField="pos_type_name"
                                            DataValueField="pos_type_seq" RepeatDirection="Horizontal">
                                        </asp:CheckBoxList>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 130px; height: 26px;" valign="top">ระดับตำแหน่ง :</td>
                                    <td align="left" colspan="3" style="height: 26px" valign="top">
                                        <asp:CheckBoxList ID="cblClass1" runat="server" DataTextField="class_name"
                                            DataValueField="class_seq" RepeatDirection="Horizontal"
                                            RepeatLayout="Flow">
                                        </asp:CheckBoxList>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 130px; height: 26px;" valign="top">&nbsp;</td>
                                    <td align="left" colspan="3" style="height: 26px" valign="top">
                                        <asp:CheckBoxList ID="cblClass3" runat="server" DataTextField="class_name"
                                            DataValueField="class_seq" RepeatDirection="Horizontal" RepeatLayout="Flow">
                                        </asp:CheckBoxList>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 130px; height: 26px;" valign="top">&nbsp;</td>
                                    <td align="left" colspan="3" style="height: 26px" valign="top">
                                        <asp:CheckBoxList ID="cblClass4" runat="server" DataTextField="class_name"
                                            DataValueField="class_seq" RepeatDirection="Horizontal"
                                            RepeatLayout="Flow">
                                        </asp:CheckBoxList>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 130px; height: 26px;" valign="top">&nbsp;</td>
                                    <td align="left" colspan="3" style="height: 26px" valign="top">
                                        <asp:CheckBoxList ID="cblClass2" runat="server" DataTextField="class_name"
                                            DataValueField="class_seq" RepeatDirection="Horizontal"
                                            RepeatLayout="Flow">
                                        </asp:CheckBoxList>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 130px">ตำแหน่ง :</td>
                                    <td align="left" style="width: 310px">
                                        <telerik:RadComboBox ID="cmbFieldPosition" runat="server"
                                            DataTextField="field_pos_name"
                                            DataValueField="field_pos_seq"
                                            AllowCustomText="true"
                                            EmptyMessage="... พิมพ์ที่นี่เพื่อค้นหา..."
                                            Width="250px">
                                        </telerik:RadComboBox>
                                        <asp:ImageButton ID="btnSelectPosition" runat="server"
                                            ImageUrl="~/App_UI/Images/Buttons/select_icon.gif"
                                            OnClick="btnSelectPosition_Click" />
                                    </td>
                                    <td align="right" style="width: 143px">ครองระดับ :</td>
                                    <td align="left" valign="middle">
                                        <telerik:RadComboBox ID="cmbClass" runat="server"
                                            CausesValidation="false"
                                            DataTextField="Name"
                                            DataValueField="Sequence"
                                            AllowCustomText="true"
                                            EmptyMessage="... พิมพ์ที่นี่เพื่อค้นหา..."
                                            Filter="Contains"
                                            OnClientTextChange="onTextChange" Width="250px">
                                        </telerik:RadComboBox>
                                        &nbsp;</td>
                                </tr>
                                <tr>
                                    <td align="right" valign="middle" style="width: 130px">&nbsp;</td>
                                    <td align="left" style="height: 25px; width: 310px;" valign="top">
                                        <asp:ListBox ID="selectFieldPosition" runat="server" Height="80px"
                                            SelectionMode="Multiple" Width="250px"></asp:ListBox>
                                        <asp:ImageButton ID="btnMovePosition" runat="server"
                                            ImageUrl="~/App_UI/Images/Buttons/cancel_icon.gif"
                                            OnClick="btnMovePosition_Click" Style="width: 18px" />
                                    </td>
                                    <td align="right" valign="top" style="width: 143px">ระยะเวลา :</td>
                                    <td align="left" valign="top">
                                        <telerik:RadTextBox ID="txtDurateClass" runat="server" MaxLength="10"
                                            Skin="Outlook" Width="100px">
                                        </telerik:RadTextBox>
                                        &nbsp;ปี</td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 130px; height: 22px;" valign="top">ระดับการศึกษา :</td>
                                    <td align="left" style="height: 22px; width: 310px;">
                                        <telerik:RadComboBox ID="cmbDegree" runat="server"
                                            CausesValidation="false"
                                            DataTextField="Name"
                                            DataValueField="Sequence"
                                            AllowCustomText="true"
                                            EmptyMessage="... พิมพ์ที่นี่เพื่อค้นหา..."
                                            Filter="Contains"
                                            OnClientTextChange="onTextChange" Width="250px">
                                        </telerik:RadComboBox>
                                        &nbsp;
                                                    <asp:ImageButton ID="btnSelectDegree" runat="server"
                                                        ImageUrl="~/App_UI/Images/Buttons/select_icon.gif"
                                                        OnClick="btnSelectDegree_Click" />
                                    </td>
                                    <td align="right" style="height: 22px; width: 143px;">วุฒิการศึกษา :</td>
                                    <td align="left" style="height: 22px">
                                        <telerik:RadComboBox ID="cmbQual" runat="server"
                                            CausesValidation="false"
                                            DataTextField="edu_qual_name"
                                            DataValueField="edu_qual_seq"
                                            AllowCustomText="true"
                                            EmptyMessage="... พิมพ์ที่นี่เพื่อค้นหา..."
                                            Filter="Contains"
                                            OnClientTextChange="onTextChange" Width="250px">
                                        </telerik:RadComboBox>
                                        &nbsp;<asp:ImageButton ID="btnSelectQual" runat="server"
                                            ImageUrl="~/App_UI/Images/Buttons/select_icon.gif"
                                            OnClick="btnSelectQual_Click" />
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 130px; height: 50px;" valign="top">&nbsp;</td>
                                    <td align="left" style="height: 50px; width: 310px;">
                                        <asp:ListBox ID="selectDegree" runat="server" Height="80px"
                                            SelectionMode="Multiple" Width="250px"></asp:ListBox>
                                        <asp:ImageButton ID="btnMoveDegree" runat="server"
                                            ImageUrl="~/App_UI/Images/Buttons/cancel_icon.gif"
                                            OnClick="btnMoveDegree_Click" />
                                    </td>
                                    <td align="right" style="height: 50px; width: 143px;">&nbsp;</td>
                                    <td align="left" style="height: 50px">
                                        <asp:ListBox ID="selectQual" runat="server" Height="80px"
                                            SelectionMode="Multiple" Width="250px"></asp:ListBox>
                                        <asp:ImageButton ID="btnMoveQual" runat="server"
                                            ImageUrl="~/App_UI/Images/Buttons/cancel_icon.gif"
                                            OnClick="btnMoveQual_Click" />
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 130px;">สาขาวิชาเอก :</td>
                                    <td align="left" style="width: 310px;">
                                        <telerik:RadComboBox ID="cmbMajor" runat="server"
                                            CausesValidation="false"
                                            DataTextField="Name"
                                            DataValueField="Sequence"
                                            AllowCustomText="true"
                                            EmptyMessage="... พิมพ์ที่นี่เพื่อค้นหา..."
                                            Filter="Contains"
                                            OnClientTextChange="onTextChange" Width="250px">
                                        </telerik:RadComboBox>
                                        <asp:ImageButton ID="btnSelectMajor" runat="server"
                                            ImageUrl="~/App_UI/Images/Buttons/select_icon.gif"
                                            OnClick="btnSelectMajor_Click" />
                                        &nbsp;</td>
                                    <td align="right" style="width: 143px">สถาบันการศึกษา :</td>
                                    <td align="left">
                                        <telerik:RadComboBox ID="cmbInstitutes" runat="server"
                                            CausesValidation="false"
                                            DataTextField="edu_ins_name"
                                            DataValueField="edu_ins_seq"
                                            AllowCustomText="true"
                                            EmptyMessage="... พิมพ์ที่นี่เพื่อค้นหา..."
                                            Filter="Contains"
                                            OnClientTextChange="onTextChange" Width="250px">
                                        </telerik:RadComboBox>
                                        <asp:ImageButton ID="btnSelectIns" runat="server"
                                            ImageUrl="~/App_UI/Images/Buttons/select_icon.gif"
                                            OnClick="btnSelectIns_Click" />
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 130px; height: 50px;" valign="top">&nbsp;</td>
                                    <td align="left" style="height: 50px; width: 310px;">
                                        <asp:ListBox ID="selectMajor" runat="server" Height="80px"
                                            SelectionMode="Multiple" Width="250px"></asp:ListBox>
                                        <asp:ImageButton ID="btnMoveMajor" runat="server"
                                            ImageUrl="~/App_UI/Images/Buttons/cancel_icon.gif"
                                            OnClick="btnMoveMajor_Click" />
                                    </td>
                                    <td align="right" style="width: 143px; height: 50px;">&nbsp;</td>
                                    <td align="left" style="height: 50px">
                                        <asp:ListBox ID="selectInstitutes" runat="server" Height="80px"
                                            SelectionMode="Multiple" Width="250px"></asp:ListBox>
                                        <asp:ImageButton ID="btnMoveIns" runat="server"
                                            ImageUrl="~/App_UI/Images/Buttons/cancel_icon.gif"
                                            OnClick="btnMoveIns_Click" />
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 130px;" valign="top">&nbsp;</td>
                                    <td align="left" style="width: 310px;">
                                        <asp:Button ID="cmdSearch" runat="server" OnClick="cmdSearch_Click"
                                            Style="height: 26px" Text="ค้นหา" Width="104px" />
                                    </td>
                                    <td align="right" style="width: 143px">&nbsp;</td>
                                    <td align="left">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 130px; height: 26px;">&nbsp;</td>
                                    <td style="width: 310px; height: 26px;">&nbsp;</td>
                                    <td style="width: 143px; height: 26px;">&nbsp;</td>
                                    <td style="height: 26px">&nbsp;</td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </div>
                </td>
            </tr>
        </table>


    </asp:Panel>

</asp:Content>
